﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="SimpleForm_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<title></title>
</head>
<body>
	<form id="form1" runat="server">
	<t:Manager runat="server">
		<ClientIds>
			<t:AssignedClientId runat="server" ControlId="tv" Variable="_tv">
			</t:AssignedClientId>
			<t:AssignedClientId runat="server" ControlId="txtValue" Variable="_txtValue">
			</t:AssignedClientId>
		</ClientIds>
		<Includes>
			<t:StyleFileInclude Src="~/Res/CSS/Main.css" />
			<t:ScriptFileInclude Src="TreeView.js" />
		</Includes>
		<Scenarios>
			<t:PostScenario ID="psTest" runat="server" ReturnControlIds="txtChecked">
				<PostControls>
					<t:ControlReference runat="server" ControlId="tv" Properties="Nodes" />
				</PostControls>
			</t:PostScenario>
		</Scenarios>
	</t:Manager>
	<div>
		<t:TreeView runat="server" ID="tv">
			<Templates>
				<t:NodeTemplate Id="Main">
					<Template>
						<t:Label runat="server" ID="lblA" Data-Field="A" />
						-
						<t:Label runat="server" ID="lblB" Data-Field="B" />
					</Template>
				</t:NodeTemplate>
			</Templates>
			<TemplateMappings>
				<%--<t:LevelMapping Level="1" TemplateId="Second" />--%>
				<t:LevelRangeMapping TemplateId="Main" />
			</TemplateMappings>
			<LoadNodes OnServer="tv_LoadNodes" PostScenarioId="_psEmpty" />
			<Nodes>
				<t:HyperLinkNode Href="http://www.yahoo.com/" Text="Yahoo!">
					<t:ExpansionNode Text="Expand dynamic HyperLink nodes" NumChildren="2" UniqueId="tnExp1">
					</t:ExpansionNode>
					<t:ExpansionNode Text="Expand static template nodes">
						<t:TemplateNode>
						</t:TemplateNode>
						<t:TemplateNode>
						</t:TemplateNode>
					</t:ExpansionNode>
					<%--Future functionality--%>
					<%--<t:ExpansionNode Text="Expand dynamic template nodes" NumChildren="2" UniqueId="tnExp2">
					</t:ExpansionNode>--%>
					<t:ExpansionNode Text="Expand CheckBox nodes" Expanded="false">
						<t:CheckBoxNode Text="Checkbox 1" UniqueId="tnCB1">
						</t:CheckBoxNode>
						<t:CheckBoxNode Text="Checkbox 2" UniqueId="tnCB2">
						</t:CheckBoxNode>
					</t:ExpansionNode>
				</t:HyperLinkNode>
				<t:HyperLinkNode Href="http://www.google.com/" Text="Google">
					<t:SelectionNode Text="Select 3" Value="3">
					</t:SelectionNode>
					<t:SelectionNode Text="Select 4" Value="4">
					</t:SelectionNode>
				</t:HyperLinkNode>
			</Nodes>
		</t:TreeView>
	</div>
	<div>
		<t:Label runat="server" ID="lblValue" Text="TreeView value:" For="txtValue" />
		<t:TextBox runat="server" ID="txtValue" />
		<br />
		<t:Label ID="lblChecked" runat="server" Text="Checked">
		</t:Label>
		<t:TextBox ID="txtChecked" runat="server">
		</t:TextBox>
		<t:Button ID="btnTest" runat="server" Text="Test">
			<Click PostScenarioId="psTest" OnServer="btnTest_Click" />
		</t:Button>
		<br />
	</div>
	</form>
</body>
</html>
